/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
public class Main {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 1; i <=100 ; i++) {
            int tamp = i;
            while(tamp != 0){
                if(tamp % 10 == 9){
                    count++;
                }
                tamp /= 10;
            }
        }
        System.out.println(count);
    }
}